#pragma once

#include <SFML\Graphics.hpp>
#include <list>
#include <iostream>

#include "Vector3d.h"
#include "Plane.h"
#include "Cube.h"
#include "Sphere.h"
#include "PlanePart.h"
#include "Matrixd.h"

#include <fstream>

using namespace std;

class RayTracer
{
private:
	list<RenderObject*> * objects;
	Vector3d * directions;
	
	

	int sizex;
	int sizey;

	void initRays();
	void lookAt(Vector3d pos,Vector3d target);
public:
	Vector3d eye;
	bool done;
	sf::Image image;
	Matrixd rotation;
	RayTracer(int x,int y);
	void run();
	TraceResult trace(const Ray &ray);
	void rotate( double anglex , double angley, double anglez );
	~RayTracer(void);
};

